<!DOCTYPE html>
<html class="ui-page-login">

<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>2017延长壳牌供应链日</title>

<script
  src="https://code.jquery.com/jquery-2.2.4.min.js"
  integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  crossorigin="anonymous"></script></head>
<style>
/* body { */
/* 	margin: 0; */
/* 	padding: 0; */
/* 	background: url(webpages/wx/led/images/sign.png) top center no-repeat; */
/* } */
html,body{height: 100%;width: 100%;margin:0;padding:0;}  
body{  
    background:url(webpages/wx/led/images/sign.jpg)no-repeat;  
    width:100%;  
    height:100%;  
    background-size:100% 100%;  
    position: relative;
/*     width: 100%; */
/*     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='webpages/wx/led/images/sign.jpg',sizingMethod='scale');   */
	touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}  
#signBtn {
	 background:url(webpages/wx/led/images/btn.png) no-repeat;  
}
 input {outline:none;}
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { 
    color:#f07f1d;
}
input:-moz-placeholder, textarea:-moz-placeholder { 
    color:#f07f1d;
}
input::-moz-placeholder, textarea::-moz-placeholder { 
    color:#f07f1d;
}
input:-ms-input-placeholder, textarea:-ms-input-placeholder { 
    color:#f07f1d;
}
input.form-input1 {
    width: 60%;
    position: relative;
/*     left: 20%; */
    border: none;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: #f07f1d;
    background: none;
    border-bottom: 1px solid #f07f1d;
/*     margin-bottom: 10px; */
    font-size: 1.0em;
}

input.submit {
	background:url(webpages/wx/led/images/btn.png) no-repeat;
	background-size:100% 100%;  
	width: 100px;
	height: 100px;
	border:none;
}
</style>
<body>
	<form action="signWxUserInfo2.action" style="position: relative;width: 100%;top: 58%;text-align: center;">
	<div style="position: relative;width: 100%;top: 60%;text-align: center;">
		<input type="hidden" name="openId" value="${(user.openId)!}" />
		<input type="hidden" name="nickName" value="${(user.nickname)!}" />
		<input type="hidden" name="sex" value="${(user.sex)!}" />
		<input type="hidden" name="country" value="${(user.country)!}" />
		<input type="hidden" name="province" value="${(user.province)!}" />
		<input type="hidden" name="city" value="${(user.city)!}" />
		<input type="hidden" name="headImgUrl" value="${(user.headImgUrl)!}" />
		<input type="hidden" name="companyCode" value="max" />
		<input type="text" maxlength="10" class="form-control form-input1" id="name" name="name" placeholder="请输入姓名" value="" required="">
		<input type="text" maxlength="10" class="form-control form-input1" id="position" name="position" placeholder="请输入工作单位" value="" >
	</div>
	<div style="position: relative;width: 100%; text-align: center; top: 63%;">
<!-- 		<img src="webpages/wx/led/images/btn.png"  -->
<!-- 			style="width: 100px; display: inline-block; margin: auto;"/> -->
			<input type="submit" class="submit" value=" "/> 
		
	</div>	
	</form>
</body>
<script type="text/javascript">
	function sign() {
		var data = {
				openId:'${(user.openId)!}',
				nickName:'${(user.nickname)!}',
				sex:'${(user.sex)!}',
		        country:'${(user.country)!}',
		        province:'${(user.province)!}',
		        city:'${(user.city)!}',
		        headImgUrl:'${(user.headImgUrl)!}',
		        companyCode:'${companyCode!}',
		        position:$('#position').val(),
		        name:$('#name').val()
		};
//    		data = {
//    				openId:''+Date.parse(new Date()),
//    				nickName:'max',
//    				sex:'0',
//    		        country:'zh',
//    		        province:'fj',
//    		        city:'xm',
//    		        headImgUrl:'http://image.zhangxinxu.com/image/study/p/s200/ps6.jpg',
//    		        companyCode:'max',
// 		        position:$('#position').val(),
// 		        name:$('#name').val()
//    		};

//    		if(!$('#name').val()) {
//    			alert('请填写完整姓名信息');
//    			return;
//    		}
		$.ajax({
			type : "POST",
			url : "signWxUserInfo.action",
			data : data, //序列化   
			dataType:'json',
			error : function(request) { // 设置表单提交出错 
				alert('签到失败,请重新签到');
			},
			success : function(data) {
				if(data.success) {
					window.location.href='signResult.action?openId='+data.obj.openId+"&name="+data.obj.name;
				} else {
					alert(data.msg);
				}
				
			}
		});
	}
</script>
</html>